<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${productCategory.name} 商品列表 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="Meida Team" />
<meta name="Copyright" content="Meida" />
<%if (productCategory.metaKeywords! != ""){%><meta name="keywords" content="${productCategory.metaKeywords}" /><%}%>
<%if (productCategory.metaDescription! != ""){%><meta name="description" content="${productCategory.metaDescription}" /><%}%>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<% include("/WEB-INF/views/common/include.html"){}%>
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/product.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/product_list.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/product.js"></script>
</head>
<body class="productList">
	<div id="addCartItemTip" class="addCartItemTip">
		<div class="top">
			<div class="tipClose addCartItemTipClose"></div>
		</div>
		<div class="middle">
			<p>
				<span id="addCartItemTipMessageIcon">&nbsp;</span>
				<span id="addCartItemTipMessage"></span>
			</p>
			<p id="addCartItemTipInfo" class="red"></p>
			<input type="button" class="formButton tipClose" value="继续购物" hidefocus="true" />
			<input type="button" class="formButton" onclick="location.href='${base}/shop/cartItem/list'" value="进入购物车" hidefocus="true" />
		</div>
		<div class="bottom"></div>
	</div>
	<%include("/shop/header.html"){}%>
	<div class="listBar listBar_top">
		<div class="left"></div>
		<div class="middle">
			<div class="path">
				<a href="${base}/" class="home"><span class="icon">&nbsp;</span>首页</a>>
				<%for(list in pathList){%>
					<a href="${base}/shop/product/list?id=${list.id}">${list.name}</a>>
				<%}%>
			</div>
			<div class="total">共计: ${pager.totalRow} 款商品</div>
		</div>
		<div class="right"></div>
	</div>
	<div class="blank" style="height: 0px;"></div>
	<div class="body">
		<div class="bodyLeft">
			<div class="productCategory">
            	<div class="top">商品分类</div>
            	<div class="middle clearfix">
            		<ul class="menu">
            			<%for(list in rootProductCategoryList){%>
            				<li class="mainCategory">
								<a href="${base}/shop/product/list?id=${list.id}">${list.name}</a>
							</li>
							<%var childrenList = list.children;%>
							<%if (childrenList != null && childrenList.~size > 0){%>
								<%for(c1_List in childrenList){%>
									<li>
										<a href="${base}/shop/product/list?id=${c1_List.id}"><span class="icon">&nbsp;</span>${c1_List.name}</a>
										<%var childrenList2 = c1_List.children;%>
										<%if (childrenList2 != null && childrenList2.~size > 0){%>
											<ul>
												<%for(c2_List in childrenList2){%>
													<li>
														<a href="${base}/shop/product/list?id=${c2_List.id}"><span class="icon">&nbsp;</span>${c2_List.name}</a>
													</li>
												<%}%>
											</ul>
										<%}%>
									</li>
									<%if (c1_ListLP.index == 5){%>
										<%break;%>
									<%}%>
								<%}%>
							<%}%>
							<%if (listLP.index == 3){%>
								<%break;%>
							<%}%>
            			<%}%>
					</ul>
            	</div>
                <div class="bottom"></div>
			</div>
			<div class="blank"></div>
			<div class="hotProduct">
				<div class="top">热销排行</div>
				<div class="middle clearfix">
					<ul>
						<%for(list in hotProductList!){%>
							<li class="number${listLP.index}">
								<%if (strutil.length(list.name) < 15){%>
									<span class="icon">&nbsp;</span><a href="${base}${list.htmlFilePath}" title="${list.name}">${list.name}</a>
								<%}else{%>
									<span class="icon">&nbsp;</span><a href="${base}${list.htmlFilePath}" title="${list.name}">${strutil.subStringTo(list.name,0,11)}...</a>
								<%}%>
							</li>
							<%if (listLP.index == 10){%>
								<%break;%>
							<%}%>
						<%}%>
					</ul>
				</div>
				<div class="bottom"></div>
			</div>
			<div class="blank"></div>
			<div class="productHistory">
				<div class="top">浏览记录</div>
				<div class="middle clearfix">
					<ul id="productHistoryListDetail"></ul>
				</div>
				<div class="bottom"></div>
			</div>
		</div>
		<div class="bodyRight">
			<form id="productListForm" action="${base}/shop/product/list" method="get">
				<input type="hidden" name="id" value="${productCategory.id}" />
				<input type="hidden" id="viewType" name="viewType" value="tableType" />
				<input type="hidden" id="pageNumber" name="pageNumber" value="${pageNumber!}" />
				<div class="blank" style="height: 0px;"></div>
				<div class="operateBar">
					<div class="left"></div>
					<div class="middle">
						<span class="tableDisabledIcon">&nbsp;</span>列表
						<span class="pictureIcon">&nbsp;</span><a id="pictureType" class="pictureType" href="#">图片</a>
						<span class="separator">&nbsp;</span>
						<select id="orderType" name="orderType">
							<option value="default"<%if (orderType! == "default"){%> selected="selected"<%}%>>默认排序</option>
							<option value="priceAsc"<%if (orderType! == "priceAsc"){%> selected="selected"<%}%>>价格从低到高</option>
							<option value="priceDesc"<%if (orderType! == "priceDesc"){%> selected="selected"<%}%>>价格从高到低</option>
							<option value="dateAsc"<%if (orderType! == "dateAsc"){%> selected="selected"<%}%>>按上价时间排序</option>
	                    </select>
	                    <span class="separator">&nbsp;</span>
	                    显示数量:
	                    <select name="pageSize" id="pageSize">
							<option value="12" <%if (pageSize! == 12){%>selected="selected" <%}%>>
								12
							</option>
							<option value="24" <%if (pageSize! == 24){%>selected="selected" <%}%>>
								24
							</option>
							<option value="60" <%if (pageSize! == 60){%>selected="selected" <%}%>>
								60
							</option>
							<option value="120" <%if (pageSize! == 120){%>selected="selected" <%}%>>
								120
							</option>
						</select>
					</div>
					<div class="right"></div>
				</div>
				<div class="blank"></div>
				<div class="productTableList">
					<ul class="productListDetail">
						<%for(list in pager.list){%>
							<li>
								<a href="${base}${list.htmlFilePath}" class="productImage" target="_blank">
									<img src="${base}${list.productImageList[0].sourceProductImagePath!}" alt="${list.name}" />
								</a>
								<div class="productTitle">
									<%if (strutil.length(list.name) < 28){%>
										<a href="${base}${list.htmlFilePath}" alt="${list.name}" target="_blank">${list.name}</a>
									<%}else{%>
										<a href="${base}${list.htmlFilePath}" alt="${list.name}" target="_blank">${strutil.subStringTo(list.name,0,24)}...</a>
									<%}%>
								</div>
								<div class="productRight">
									<div class="productPrice">
										<span class="price">${list.price,priceCurrencyFormat}</span>
										<span class="marketPrice">${list.marketPrice,priceCurrencyFormat}</span>
									</div>
									<div class="productButton">
										<%if (list.isOutOfStock){%>
											<input type="button" class="outOfStockButton" value="" hidefocus="true" />
										<%}else{%>
											<input type="button" name="addCartItemButton" class="addCartItemButton addCartItem {id: '${list.id}'}" value="" hidefocus="true" />
										<%}%>
										<input type="button" name="addFavoriteButton" class="addFavoriteButton addFavorite {id: '${list.id}'}" value="" hidefocus="true" />
									</div>
								</div>
							</li>
						<%}%>
						<%if (pager.list.~size == 0){%>
                			<li class="noRecord">非常抱歉，没有找到相关商品！</li>
                		<%}%>
					</ul>
					<div class="blank"></div>
         			<link href="${base}/template/shop/css/pager.css" rel="stylesheet" type="text/css" />
         			<!-- 分页 -->
				</div>
			</form>
		</div>
		<div class="blank"></div>
		<%include("/WEB-INF/views/shop/friend_link.html"){}%>
	</div>
	<div class="blank"></div>
	<%include("/WEB-INF/views/shop/footer.html"){}%>
</body>
</html>